let message = document.querySelector('#massage');
let messageText = message.value;

let bt = document.querySelector('input');
bt.onclick = function () {
    messageText = message.value;
    if (messageText !== '') {
        let li = document.createElement('li');
        let messageBord = document.querySelector('.messageBord');
        li.innerHTML = messageText + '<a href="javascript:;">删除</a>';
        messageBord.appendChild(li);
        let as = document.querySelectorAll('a');
        for (let i = 0; i < as.length; i++) {
            as[i].onclick = function () {
                messageBord.removeChild(this.parentNode);
            }
        }
    } else {
        alert('你倒是输入留言啊nmd');
    }
}